<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
    <head>
        <meta charset="UTF-8">
        <title>sideBar</title>
    </head>
    <body>

    <!-- Sidebar -->
    <ul  th:fragment="sideBar" class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
        <!-- 侧边栏 -->
        <a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.html">
            <div class="sidebar-brand-icon">
                <i class="fas fa-user-circle"></i>
            </div>
            <div class="sidebar-brand-text mx-3">我的管理</div>
        </a>

        <!-- Divider -->
        <hr class="sidebar-divider my-0">

        <!-- Nav Item - Utilities Collapse Menu -->
        <li class="nav-item"  th:class="${(active == 'myPage' or active == 'myPassword')?'nav-item active':'nav-item'}">
            <a class="nav-link" href="#" data-toggle="collapse" data-target="#collapseUtilities"
               aria-expanded="true" aria-controls="collapseUtilities">
                <i class="fas fa-fw fa-wrench"></i>
                <span>我的信息</span>
            </a>
            <div id="collapseUtilities" class="collapse" th:class="${(active == 'myPage' or active == 'myPassword')?'collapse show':'collapse'}" aria-labelledby="headingUtilities"
                 data-parent="#accordionSidebar">
                <div class="bg-white py-2 collapse-inner rounded">
                    <a class="collapse-item"  th:class="${(active == 'myPage')?'collapse-item active':'collapse-item'}" href="/userPage/index">基本信息</a>
                    <a class="collapse-item" th:class="${(active == 'myPassword')?'collapse-item active':'collapse-item'}" href="/userPage/myPassword">更改密码</a>
                </div>
            </div>

        </li>
        <!-- Nav Item - Pages Collapse Menu -->
        <li class="nav-item"  th:class="${(active == 'myArticle')?'nav-item active':'nav-item'}">
            <a class="nav-link" href="/userPage/myArticle">
                <i class="fas fa-fw fa-book-dead"></i>
                <span>我的投稿</span></a>
        </li>

        <!-- Divider -->
        <hr class="sidebar-divider">

        <!-- Heading -->
        <div class="sidebar-heading">
            其他信息
        </div>

        <!-- Nav Item - Pages Collapse Menu -->
        <li class="nav-item"   th:class="${(active == 'myInfo')?'nav-item active':'nav-item'}">
            <a class="nav-link" href="/system/information/myInfo">
                <i class="fas fa-fw fa-info-circle"></i>
                <span>我的消息</span></a>
        </li>

        <!-- Nav Item - Charts -->
        <li class="nav-item"   th:class="${(active == 'myPayment')?'nav-item active':'nav-item'}">
            <a class="nav-link" href="/system/payment/myPayment">
                <i class="fas fa-fw fa-money-bill-wave-alt"></i>
                <span>我的稿费</span></a>
        </li>

        <!-- 保留 -->
        <!--            <li class="nav-item active">-->
        <!--                <a class="nav-link" href="tables.html">-->
        <!--                    <i class="fas fa-fw fa-table"></i>-->
        <!--                    <span>Tables</span></a>-->
        <!--            </li>-->

        <!-- Divider -->
        <hr class="sidebar-divider d-none d-md-block">

        <!-- Sidebar Toggler (Sidebar) -->
        <div class="text-center d-none d-md-inline">
            <button class="rounded-circle border-0" id="sidebarToggle"></button>
        </div>

    </ul>
    <!-- Sidebar侧边栏代码结束 -->




    <!-- 头部导航栏 -->
    <nav th:fragment="navBar" class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

        <!-- Sidebar Toggle (Topbar) -->
        <form class="form-inline">
            <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
                <i class="fa fa-bars"></i>
            </button>
        </form>

        <!-- Topbar Search -->
        <form
                class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
            <div class="input-group">
                <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..."
                       aria-label="Search" aria-describedby="basic-addon2">
                <div class="input-group-append">
                    <button class="btn btn-primary" type="button">
                        <i class="fas fa-search fa-sm"></i>
                    </button>
                </div>
            </div>
        </form>

        <!-- Topbar Navbar -->
        <ul class="navbar-nav ml-auto">

            <!-- Nav Item - Search Dropdown (Visible Only XS) -->
            <li class="nav-item dropdown no-arrow d-sm-none">
                <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button"
                   data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <i class="fas fa-search fa-fw"></i>
                </a>
                <!-- Dropdown - Messages -->
                <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in"
                     aria-labelledby="searchDropdown">
                    <form class="form-inline mr-auto w-100 navbar-search">
                        <div class="input-group">
                            <input type="text" class="form-control bg-light border-0 small"
                                   placeholder="Search for..." aria-label="Search"
                                   aria-describedby="basic-addon2">
                            <div class="input-group-append">
                                <button class="btn btn-primary" type="button">
                                    <i class="fas fa-search fa-sm"></i>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </li>

            <!-- Nav Item - 消息提示 -->
            <li class="nav-item dropdown no-arrow mx-1">
                <a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button"
                   data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <i class="fas fa-bell fa-fw"></i>
                    <!-- Counter - Alerts -->
                    <span class="badge badge-danger badge-counter" id="InfoNumber"></span>
                </a>
                <!-- Dropdown - Alerts -->
                <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
                     aria-labelledby="alertsDropdown">
                    <h6 class="dropdown-header">
                        消息中心
                    </h6>

                    <!--                                    <a class="dropdown-item d-flex align-items-center" href="#">-->
                    <!--                                        <div class="mr-3">-->
                    <!--                                            <div class="icon-circle bg-primary">-->
                    <!--                                                <i class="fas fa-file-alt text-white"></i>-->
                    <!--                                            </div>-->
                    <!--                                        </div>-->
                    <!--                                        <div>-->
                    <!--                                            <div class="small text-gray-500">投稿通知</div>-->
                    <!--                                            <span class="font-weight-bold">xxx稿件投稿成功</span>-->
                    <!--                                            <span class="small text-gray-500 text-right">2021-09-11</span>-->
                    <!--                                        </div>-->
                    <!--                                    </a>-->

                    <div id="info_s">

                    </div>

                    <a class="dropdown-item text-center small text-gray-500" href="/system/information/myInfo">显示所有消息</a>
                </div>
            </li>


            <div class="topbar-divider d-none d-sm-block"></div>

            <!-- Nav Item - User Information -->
            <li class="nav-item dropdown no-arrow">
                <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
                   data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <span th:text="${user.nickname}" class="mr-2 d-none d-lg-inline text-gray-600 small">用户名置</span>
                    <img class="img-profile rounded-circle"
                         th:src="@{'/system/user/picture?p='+${user.picture}}">
                </a>
                <!-- Dropdown - User Information -->
                <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
                     aria-labelledby="userDropdown">
                    <a class="dropdown-item" href="/userPage/myPage">
                        <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                        我的首页
                    </a>
                    <a class="dropdown-item"  href="/userPage/myArticle">
                        <i class="fas fa-book fa-sm fa-fw mr-2 text-gray-400"></i>
                        我的投稿
                    </a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
                        <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                        退出登录
                    </a>
                </div>
            </li>

        </ul>

    </nav>
    <!-- 头部导航栏结束 -->
    </body>


</html>

